{% extends 'blog_main.html' %}
{% block subnav %}
                <li class="nav-item" role="presentation">
                    <span class="nav-link">阅读</span>
                </li>
{% endblock %}
{% block body%}
<div class="container">
<div class="card">
  <div class="card-body">
    <h5 class="card-title">{{ form.title }}</h5>
    {% if is_author == '1' %}
    <div class="btn-group float-end">
        <button class="btn btn-light btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
          <span></span>
        </button>
        <ul class="dropdown-menu">
            <li><a class="dropdown-item fs-9" id="editA" href="javascript:void(0);">编辑</a></li>
            <li><a class="dropdown-item fs-9" id="deleteA" href="javascript:void(0);">删除</a></li>
        </ul>
    </div>
    {% endif %}
    <hr>
    <p class="card-text">{{ form.content|safe }}</p>
  </div>
</div>
</div>
{% endblock %}
{% if is_author == '1' %}
{% block javascript%}
    $(function(){
            $("#editA").click(function(){
                window.location.href = '/blog/arch/edit/{{form.article_id}}';
            });
            $("#deleteA").click(function(){
                window.location.href = '/blog/arch/delete/{{form.article_id}}';
            });
    });
{% endblock %}
{% endif %}